<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>站内信</title>
    <link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" media="all">
    <style>
        body {
            background-color: #f7f9ff;
            padding: 40px;
        }
        .swiper-container {
            padding: 20px;
        }
    </style>
</head>

<body>
<div style="display: flex;align-items: center;font-size: 17px;"><i class="layui-icon layui-icon-left goBack"
         style="font-size: 30px; color: #333;"></i><span class="goBack">返回</span></div>
    <div id="listContainer"></div>

</body>



<script src="https://cdn.bootcdn.net/ajax/libs/layui/2.5.7/layui.all.min.js"></script>
<script src="../utils.js"></script>
<script>
    layui.use(['table', 'upload', 'form', 'jquery'], function () {
        var table = layui.table,
            upload = layui.upload,
            form = layui.form,
            $ = layui.jquery;

            ajax({
                path: "/indexProducts/getPlatformMessage?status="+0,
                type: "GET",
                success: function(res) {
                    console.log(res);
                    $.each(res, function(i, t) {
                        $("#listContainer").append(`
                        <div class="layui-card">
                            ${!t.status ? '<span class="layui-badge">未读</span>' : '<span class="layui-badge">已读</span>'}
                            <div class="layui-card-header">${t.updateTime}</div>
                            <div class="layui-card-body">
                                ${t.message}
                            </div>
                        </div>
                        `)
                    })
                }
            }, $);
        $(".goBack").on('click', function () {
            window.history.go(-1);
        })
    });

</script>

</html>